import { sequelize } from '../../db';
import User from '../user/user';
import Role from '../user/role';
import { DataTypes, Model } from 'sequelize';
class UserRole extends Model { }

UserRole.init({
    RoleId: {
        type: DataTypes.INTEGER,
        references: {
            model: Role,
            key: 'id'
        }
    },
    UserId: {
        type: DataTypes.INTEGER,
        references: {
            model: User,
            key: 'id'
        }
    }
}, {
    sequelize
});

export default UserRole
